package com.xusheng.cli.entity.rechargeModule;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.OrderBy;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xusheng.cli.common.base.BaseEntity;
import com.xusheng.cli.common.validation.Update;
import lombok.*;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 平台充值(PlatformRecharge)表实体类
 *
 * @author 王鹤然
 * @since 2022-11-21 17:47:27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@TableName("recharge")
public class PlatformRecharge extends BaseEntity {
    @NotNull(message = "id不能为空", groups = Update.class)
    @OrderBy
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * id前缀
     */
    private String idPrefix;
    /**
     * 订单号
     */
    private String orderNumber;
    /**
     * 会员id
     */
//    @NotNull(message = "请选择会员账号", groups = {Save.class, Update.class})
    private Long playerId;
    /**
     * 支付方式（1：微信  2：支付宝）
     */
    private Integer payMode;
    /**
     * 支付信息 0：未支付 1：已支付
     */
    private Boolean payInfo;
    /**
     * 充值金额
     */
    private BigDecimal rechargeAmount;
    /**
     * 剩余可用金额
     */
    private BigDecimal remainingAmount;
    /**
     * 联系方式qq
     */
    private String qq;
    /**
     * 到期时间
     */
    private LocalDateTime expirationTime;
    /**
     * 会员账号
     */
    private String playerAccount;
    /**
     * 支付时间
     */
    private LocalDateTime payTime;
}

